<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>itf_sum</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="LIBIT Documentation"
HREF="index.html"><LINK
REL="UP"
HREF="refmanual.html"><LINK
REL="PREVIOUS"
TITLE="itf_compose"
HREF="man.itf-compose.html"><LINK
REL="NEXT"
TITLE="parser_delete"
HREF="man.parser-delete.html"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>LIBIT Documentation</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="man.itf-compose.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="man.parser-delete.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="MAN.ITF-SUM"
></A
>itf_sum</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN9858"
></A
><H2
>Name</H2
>itf_sum&nbsp;--&nbsp;sum operator</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN9861"
></A
><H2
>Synopsis</H2
><DIV
CLASS="FUNCSYNOPSIS"
><P
></P
><A
NAME="AEN9862"
></A
><PRE
CLASS="FUNCSYNOPSISINFO"
>#include &lt;it/math.h&gt;
      </PRE
><P
><CODE
><CODE
CLASS="FUNCDEF"
>double itf_sum</CODE
>( double x, it_function_args(itf_sum) *args
        );</CODE
></P
><P
></P
></DIV
></DIV
><H2
>DESCRIPTION</H2
><P
>The function <CODE
CLASS="FUNCTION"
>itf_sum</CODE
> defines the sum of two it_function_t. The sum of the functions is obtained by computing the value of each function at position <CODE
CLASS="PARAMETER"
>x</CODE
> and returning their sum. The sum operator has the following parameters, passed through the <CODE
CLASS="PARAMETER"
>args</CODE
> argument.</P
><DIV
CLASS="REFSECT2"
><A
NAME="AEN9874"
></A
><H3
>Function parameters</H3
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>f</DT
><DD
><P
>         The first function to sum.
      </P
></DD
><DT
>f_args</DT
><DD
><P
>         The parameters of the first function to sum.
      </P
></DD
><DT
>g</DT
><DD
><P
>         The second function to sum.
      </P
></DD
><DT
>g_args</DT
><DD
><P
>         The parameters of the second function to sum.
      </P
></DD
></DL
></DIV
></DIV
><H2
>RETURN VALUE</H2
><P
>    The sum for a given 'x'
   </P
><H2
>EXAMPLE</H2
><PRE
CLASS="PROGRAMLISTING"
>&#13;#include &lt;math.h&gt;

...

/* declare the integration parameters */
it_function_args(itf_sum) sum_args;

/* sum the identity function with itself */
sum_args.f = itf_identity;
sum_args.f_args = NULL;
sum_args.g = itf_identity;
sum_args.g_args = NULL;

/* compute the value of the sum in 1.0 */
itf_sum(1.0, &#38;sum_args);</PRE
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="man.itf-compose.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="man.parser-delete.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>itf_compose</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="refmanual.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>parser_delete</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>